<template>
  <div class="w-full h-full">
    <a-card class="w-full h-full flex justify-center">
      <div class="w-[500px] flex justify-center mt-10">
        <a-form ref="formRef" class="form-style-flex" :model="formState">
          <a-form-item name="jzbh" label="就诊编号" class="w-full">
            <a-input v-model:value="formState.jzbh" placeholder="请输入就诊编号" allow-clear />
          </a-form-item>
          <a-form-item name="psnNo" label="医保人员编号" class="w-full">
            <a-input v-model:value="formState.psnNo" placeholder="请输入医保人员编号" allow-clear />
          </a-form-item>
          <a-form-item name="mdtrtId" label="医保就诊ID" class="w-full">
            <a-input v-model:value="formState.mdtrtId" placeholder="请输入医保就诊ID" allow-clear />
          </a-form-item>
          <a-form-item name="setlId" label="医保结算ID" class="w-full">
            <a-input v-model:value="formState.setlId" placeholder="请输入医保结算ID" allow-clear />
          </a-form-item>
          <a-form-item name="cbdqh" label="参保地区划" class="w-full">
            <a-input v-model:value="formState.cbdqh" placeholder="请输入参保地区划" allow-clear />
          </a-form-item>
          <a-form-item name="" label="" class="w-full text-right mt-4">
            <a-button @click="onReset()">清空</a-button>
            <a-button type="primary" class="ml-2" @click="onSave">保存</a-button>
          </a-form-item>
        </a-form>
      </div>
    </a-card>
  </div>
</template>
<script setup>
import { ref } from 'vue'
import { message } from 'ant-design-vue'

const formRef = ref(null)
const formState = ref({})

const onReset = () => {
  formRef.value.resetFields()
}
const onSave = async () => {
  const { code, msg } = await post('/outp/mzdj/revocationHealthInsurance', {
    ...formState.value
  })
  if (code !== 0) return message.error(msg)
  message.success(msg || '保存成功')
}
</script>
